home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Business / Inventory Stuff / Inventory / background_2614.txt < prev    next >
Encoding:
Text File  |  1988-03-14  |  16.3 KB  |  735 lines

  1. -- background: 2614 from stack: in
  2. -- bmap block id: 3875
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: Inventory
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=98 top=55 right=69 bottom=204
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: StockNumber
  20.  
  21.  
  22. -- part 2 (field)
  23. -- low flags: 00
  24. -- high flags: 0000
  25. -- rect: left=98 top=77 right=90 bottom=287
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 0
  29. -- font id: 3
  30. -- text size: 9
  31. -- style flags: 0
  32. -- line height: 12
  33. -- part name: Description
  34.  
  35.  
  36. -- part 3 (field)
  37. -- low flags: 00
  38. -- high flags: 0000
  39. -- rect: left=116 top=99 right=111 bottom=174
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 65535
  43. -- font id: 3
  44. -- text size: 9
  45. -- style flags: 0
  46. -- line height: 12
  47. -- part name: QuantityOnHand
  48. ----- HyperTalk script -----
  49. on closeField
  50.   send "closeField" to field "TotalValue"
  51.   send "closeField" to field "TotalCost"
  52. end closeField
  53.  
  54.  
  55.  
  56. -- part 4 (field)
  57. -- low flags: 00
  58. -- high flags: 0000
  59. -- rect: left=351 top=100 right=114 bottom=409
  60. -- title width / last selected line: 0
  61. -- icon id / first selected line: 0 / 0
  62. -- text alignment: 65535
  63. -- font id: 3
  64. -- text size: 9
  65. -- style flags: 0
  66. -- line height: 12
  67. -- part name: QuantityOnOrder
  68.  
  69.  
  70. -- part 6 (button)
  71. -- low flags: 00
  72. -- high flags: 0000
  73. -- rect: left=364 top=280 right=308 bottom=392
  74. -- title width / last selected line: 0
  75. -- icon id / first selected line: 20098 / 20098
  76. -- text alignment: 1
  77. -- font id: 0
  78. -- text size: 12
  79. -- style flags: 0
  80. -- line height: 16
  81. -- part name: Quit
  82. ----- HyperTalk script -----
  83. on mouseUp
  84.   go home
  85. end mouseUp
  86.  
  87.  
  88.  
  89. -- part 7 (field)
  90. -- low flags: 00
  91. -- high flags: 0000
  92. -- rect: left=116 top=118 right=132 bottom=175
  93. -- title width / last selected line: 0
  94. -- icon id / first selected line: 0 / 0
  95. -- text alignment: 65535
  96. -- font id: 3
  97. -- text size: 9
  98. -- style flags: 0
  99. -- line height: 12
  100. -- part name: SellPrice
  101. ----- HyperTalk script -----
  102. on closeField
  103.   set numberFormat to ".00"
  104.   get field "SellPrice" * 1
  105.   put it into field "SellPrice"
  106.   send "closeField" to field "TotalValue"
  107. end closeField
  108.  
  109.  
  110.  
  111. -- part 8 (field)
  112. -- low flags: 00
  113. -- high flags: 0000
  114. -- rect: left=351 top=120 right=136 bottom=408
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 65535
  118. -- font id: 3
  119. -- text size: 9
  120. -- style flags: 0
  121. -- line height: 12
  122. -- part name: CostPrice
  123. ----- HyperTalk script -----
  124. on closeField
  125.   set numberFormat to ".00"
  126.   get field "CostPrice" * 1
  127.   put it into field "CostPrice"
  128.   send "closeField" to field "TotalCost"
  129. end closeField
  130.  
  131.  
  132.  
  133. -- part 9 (field)
  134. -- low flags: 00
  135. -- high flags: 0000
  136. -- rect: left=118 top=140 right=156 bottom=227
  137. -- title width / last selected line: 0
  138. -- icon id / first selected line: 0 / 0
  139. -- text alignment: 0
  140. -- font id: 3
  141. -- text size: 9
  142. -- style flags: 0
  143. -- line height: 12
  144. -- part name: Location
  145.  
  146.  
  147. -- part 10 (field)
  148. -- low flags: 00
  149. -- high flags: 0000
  150. -- rect: left=351 top=140 right=155 bottom=407
  151. -- title width / last selected line: 0
  152. -- icon id / first selected line: 0 / 0
  153. -- text alignment: 0
  154. -- font id: 3
  155. -- text size: 9
  156. -- style flags: 0
  157. -- line height: 12
  158. -- part name: VendorCode
  159.  
  160.  
  161. -- part 11 (button)
  162. -- low flags: 00
  163. -- high flags: 8003
  164. -- rect: left=428 top=110 right=125 bottom=508
  165. -- title width / last selected line: 0
  166. -- icon id / first selected line: 0 / 0
  167. -- text alignment: 1
  168. -- font id: 0
  169. -- text size: 12
  170. -- style flags: 0
  171. -- line height: 16
  172. -- part name: New Item
  173. ----- HyperTalk script -----
  174. on mouseUp
  175.   put "Use the Tab key to move around the screen." into field help
  176.   show field help
  177.   Wait For 2 Seconds
  178.   hide field help
  179.   doMenu "New Card"
  180.   tabKey
  181. end mouseUp
  182.  
  183.  
  184.  
  185. -- part 12 (button)
  186. -- low flags: 00
  187. -- high flags: 8003
  188. -- rect: left=442 top=35 right=54 bottom=492
  189. -- title width / last selected line: 0
  190. -- icon id / first selected line: 0 / 0
  191. -- text alignment: 1
  192. -- font id: 0
  193. -- text size: 12
  194. -- style flags: 0
  195. -- line height: 16
  196. -- part name: Search
  197. ----- HyperTalk script -----
  198. on mouseUp
  199.   go to background blank
  200.   ask "What stock number do you want?"
  201.   find it in field 1
  202.   if field 1 is empty then
  203.     answer "That item is not in the system." with "Okay"
  204.     go to first card in background "Inventory"
  205.   end if
  206. end mouseUp
  207.  
  208.  
  209.  
  210. -- part 13 (button)
  211. -- low flags: 00
  212. -- high flags: 0000
  213. -- rect: left=493 top=35 right=54 bottom=510
  214. -- title width / last selected line: 0
  215. -- icon id / first selected line: 16560 / 16560
  216. -- text alignment: 1
  217. -- font id: 0
  218. -- text size: 12
  219. -- style flags: 0
  220. -- line height: 16
  221. -- part name: Next
  222. ----- HyperTalk script -----
  223. on mouseUp
  224.   go to next card of this background
  225. end mouseUp
  226.  
  227.  
  228. -- part 14 (button)
  229. -- low flags: 00
  230. -- high flags: 0000
  231. -- rect: left=424 top=35 right=53 bottom=439
  232. -- title width / last selected line: 0
  233. -- icon id / first selected line: 15420 / 15420
  234. -- text alignment: 1
  235. -- font id: 0
  236. -- text size: 12
  237. -- style flags: 0
  238. -- line height: 16
  239. -- part name: Previous
  240. ----- HyperTalk script -----
  241. on mouseUp
  242.   go to previous card of this background
  243. end mouseUp
  244.  
  245.  
  246.  
  247. -- part 16 (button)
  248. -- low flags: 00
  249. -- high flags: 8003
  250. -- rect: left=427 top=164 right=181 bottom=507
  251. -- title width / last selected line: 0
  252. -- icon id / first selected line: 0 / 0
  253. -- text alignment: 1
  254. -- font id: 0
  255. -- text size: 12
  256. -- style flags: 0
  257. -- line height: 16
  258. -- part name: Returns
  259. ----- HyperTalk script -----
  260. on mouseUp
  261.   push card
  262.   put field "StockNumber" into cItem
  263.   go to background blank
  264.   ask "How many of "&cItem&" were returned?"
  265.   put it into returned
  266.   go to background inventory
  267.   find cItem in field 1
  268.   put field "QuantityOnHand" + returned into field 3
  269.   send "closeField" to field "TotalValue"
  270.   send "closeField" to field "TotalCost"
  271.   set numberFormat to "0"
  272.   put field "PeriodSales" - returned into field "PeriodSales"
  273.   put field "YearlySales" - returned into field "YearlySales"
  274. end mouseUp
  275.  
  276.  
  277.  
  278. -- part 17 (button)
  279. -- low flags: 00
  280. -- high flags: 8003
  281. -- rect: left=427 top=144 right=160 bottom=507
  282. -- title width / last selected line: 0
  283. -- icon id / first selected line: 0 / 0
  284. -- text alignment: 1
  285. -- font id: 0
  286. -- text size: 12
  287. -- style flags: 0
  288. -- line height: 16
  289. -- part name: Sales
  290. ----- HyperTalk script -----
  291. on mouseUp
  292.   put field "StockNumber" into itemno
  293.   put field "QuantityOnHand" into quantity
  294.   go to background blank
  295.   ask "How many of "&itemno&" were sold?"
  296.   put it into sold
  297.   if quantity < sold
  298.   then
  299.   answer "There aren't that many in stock!" with "Cancel"
  300.   go to background inventory
  301.   find itemno in field 1
  302. else
  303.   go to background inventory
  304.   find itemno in field 1
  305.   put quantity - sold into field 3
  306.   send "closeField" to field "TotalValue"
  307.   send "closeField" to field "TotalCost"
  308.   set numberFormat to "0"
  309.   put field "PeriodSales" + it into field "PeriodSales"
  310.   put field "YearlySales" + it into field "YearlySales"
  311.   put the date into field "LastSold"
  312. end if
  313. end mouseUp
  314.  
  315.  
  316.  
  317. -- part 18 (button)
  318. -- low flags: 00
  319. -- high flags: 8003
  320. -- rect: left=427 top=185 right=200 bottom=508
  321. -- title width / last selected line: 0
  322. -- icon id / first selected line: 0 / 0
  323. -- text alignment: 1
  324. -- font id: 0
  325. -- text size: 12
  326. -- style flags: 0
  327. -- line height: 16
  328. -- part name: Orders
  329. ----- HyperTalk script -----
  330. on mouseUp
  331.   push card
  332.   put field "StockNumber" into cItem
  333.   go to background blank
  334.   ask "How many of "&cItem&" are ordered?"
  335.   put it into ordered
  336.   go to background inventory
  337.   find cItem in field 1
  338.   put ordered into field "QuantityOnOrder"
  339.   put the date into field "LastOrdered"
  340. end mouseUp
  341.  
  342.  
  343.  
  344. -- part 19 (button)
  345. -- low flags: 00
  346. -- high flags: 8003
  347. -- rect: left=427 top=205 right=220 bottom=509
  348. -- title width / last selected line: 0
  349. -- icon id / first selected line: 0 / 0
  350. -- text alignment: 1
  351. -- font id: 0
  352. -- text size: 12
  353. -- style flags: 0
  354. -- line height: 16
  355. -- part name: Receipts
  356. ----- HyperTalk script -----
  357. on mouseUp
  358.   push card
  359.   put field "StockNumber" into cItem
  360.   put field "QuantityOnOrder" into ordered
  361.   go to background blank
  362.   ask "How many of "&cItem&" were received?"
  363.   put it into received
  364.   if ordered < received
  365.   then
  366.   answer "There aren't that many on order!" with "Cancel"
  367.   put 0 into received
  368.   go to background inventory
  369.   find cItem in field 1
  370. else
  371.   find cItem in field 1
  372.   put field "QuantityOnHand" + received into field 3
  373.   put ordered - received into field "QuantityOnOrder"
  374.   send "closeField" to field "TotalValue"
  375.   send "closeField" to field "TotalCost"
  376.   put the date into field "LastReceived"
  377. end if
  378. end mouseUp
  379.  
  380.  
  381.  
  382.  
  383. -- part 20 (button)
  384. -- low flags: 00
  385. -- high flags: 0000
  386. -- rect: left=242 top=10 right=32 bottom=271
  387. -- title width / last selected line: 0
  388. -- icon id / first selected line: 19678 / 19678
  389. -- text alignment: 1
  390. -- font id: 0
  391. -- text size: 12
  392. -- style flags: 0
  393. -- line height: 16
  394. -- part name: About
  395. ----- HyperTalk script -----
  396. on mouseUp
  397.   go to background "About"
  398. end mouseUp
  399.  
  400.  
  401.  
  402. -- part 22 (field)
  403. -- low flags: 00
  404. -- high flags: 0000
  405. -- rect: left=10 top=206 right=221 bottom=68
  406. -- title width / last selected line: 0
  407. -- icon id / first selected line: 0 / 0
  408. -- text alignment: 65535
  409. -- font id: 3
  410. -- text size: 9
  411. -- style flags: 0
  412. -- line height: 12
  413. -- part name: PeriodSales
  414.  
  415.  
  416. -- part 23 (field)
  417. -- low flags: 00
  418. -- high flags: 0000
  419. -- rect: left=92 top=206 right=220 bottom=150
  420. -- title width / last selected line: 0
  421. -- icon id / first selected line: 0 / 0
  422. -- text alignment: 65535
  423. -- font id: 3
  424. -- text size: 9
  425. -- style flags: 0
  426. -- line height: 12
  427. -- part name: YearlySales
  428.  
  429.  
  430. -- part 24 (field)
  431. -- low flags: 00
  432. -- high flags: 0000
  433. -- rect: left=173 top=206 right=221 bottom=241
  434. -- title width / last selected line: 0
  435. -- icon id / first selected line: 0 / 0
  436. -- text alignment: 1
  437. -- font id: 3
  438. -- text size: 9
  439. -- style flags: 0
  440. -- line height: 12
  441. -- part name: LastOrdered
  442.  
  443.  
  444. -- part 25 (field)
  445. -- low flags: 00
  446. -- high flags: 0000
  447. -- rect: left=261 top=206 right=220 bottom=329
  448. -- title width / last selected line: 0
  449. -- icon id / first selected line: 0 / 0
  450. -- text alignment: 1
  451. -- font id: 3
  452. -- text size: 9
  453. -- style flags: 0
  454. -- line height: 12
  455. -- part name: LastReceived
  456.  
  457.  
  458. -- part 26 (field)
  459. -- low flags: 00
  460. -- high flags: 0000
  461. -- rect: left=343 top=206 right=220 bottom=410
  462. -- title width / last selected line: 0
  463. -- icon id / first selected line: 0 / 0
  464. -- text alignment: 1
  465. -- font id: 3
  466. -- text size: 9
  467. -- style flags: 0
  468. -- line height: 12
  469. -- part name: LastSold
  470.  
  471.  
  472. -- part 27 (field)
  473. -- low flags: 00
  474. -- high flags: 0000
  475. -- rect: left=93 top=229 right=242 bottom=152
  476. -- title width / last selected line: 0
  477. -- icon id / first selected line: 0 / 0
  478. -- text alignment: 65535
  479. -- font id: 3
  480. -- text size: 9
  481. -- style flags: 0
  482. -- line height: 12
  483. -- part name: TotalValue
  484. ----- HyperTalk script -----
  485. on closeField
  486.   set numberFormat to ".00"
  487.   get field "QuantityOnHand" * field "SellPrice"
  488.   put it into field "TotalValue"
  489. end closeField
  490.  
  491.  
  492.  
  493. -- part 28 (field)
  494. -- low flags: 00
  495. -- high flags: 0000
  496. -- rect: left=352 top=229 right=243 bottom=412
  497. -- title width / last selected line: 0
  498. -- icon id / first selected line: 0 / 0
  499. -- text alignment: 65535
  500. -- font id: 3
  501. -- text size: 9
  502. -- style flags: 0
  503. -- line height: 12
  504. -- part name: TotalCost
  505. ----- HyperTalk script -----
  506. on closeField
  507.   set numberFormat to ".00"
  508.   get field "QuantityOnHand" * field "CostPrice"
  509.   put it into field "TotalCost"
  510. end closeField
  511.  
  512.  
  513.  
  514. -- part 29 (button)
  515. -- low flags: 00
  516. -- high flags: 8003
  517. -- rect: left=428 top=71 right=87 bottom=508
  518. -- title width / last selected line: 0
  519. -- icon id / first selected line: 0 / 0
  520. -- text alignment: 1
  521. -- font id: 0
  522. -- text size: 12
  523. -- style flags: 0
  524. -- line height: 16
  525. -- part name: Modify
  526. ----- HyperTalk script -----
  527. on mouseUp
  528.   put "Use the Tab key to move around the screen." into field help
  529.   show field help
  530.   Wait For 2 Seconds
  531.   hide field help
  532.   tabKey
  533. end mouseUp
  534.  
  535.  
  536.  
  537. -- part 30 (button)
  538. -- low flags: 00
  539. -- high flags: 8003
  540. -- rect: left=428 top=91 right=106 bottom=508
  541. -- title width / last selected line: 0
  542. -- icon id / first selected line: 0 / 0
  543. -- text alignment: 1
  544. -- font id: 0
  545. -- text size: 12
  546. -- style flags: 0
  547. -- line height: 16
  548. -- part name: Delete
  549. ----- HyperTalk script -----
  550. on mouseUp
  551.   answer "Do you really want to delete this card?" with "Yes" or "No"
  552.   if it is "Yes" then
  553.     doMenu Delete Card
  554.     go to previous card
  555.   end if
  556. end mouseUp
  557.  
  558.  
  559.  
  560. -- part 31 (button)
  561. -- low flags: 00
  562. -- high flags: 8003
  563. -- rect: left=426 top=264 right=278 bottom=508
  564. -- title width / last selected line: 0
  565. -- icon id / first selected line: 0 / 0
  566. -- text alignment: 1
  567. -- font id: 0
  568. -- text size: 12
  569. -- style flags: 0
  570. -- line height: 16
  571. -- part name: Sort
  572. ----- HyperTalk script -----
  573. on mouseUp
  574.   sort by field 1 of this background
  575.   go to first card of background "Inventory"
  576. end mouseUp
  577.  
  578.  
  579.  
  580. -- part 33 (field)
  581. -- low flags: 80
  582. -- high flags: 0001
  583. -- rect: left=5 top=10 right=33 bottom=422
  584. -- title width / last selected line: 0
  585. -- icon id / first selected line: 0 / 0
  586. -- text alignment: 0
  587. -- font id: 3
  588. -- text size: 14
  589. -- style flags: 768
  590. -- line height: 18
  591. -- part name: help
  592.  
  593.  
  594. -- part 34 (button)
  595. -- low flags: 00
  596. -- high flags: 8003
  597. -- rect: left=426 top=282 right=297 bottom=508
  598. -- title width / last selected line: 0
  599. -- icon id / first selected line: 0 / 0
  600. -- text alignment: 1
  601. -- font id: 0
  602. -- text size: 12
  603. -- style flags: 0
  604. -- line height: 16
  605. -- part name: Period End
  606. ----- HyperTalk script -----
  607. on mouseUp
  608.   go to first card of background "Inventory"
  609.   put 0 into costofgoods
  610.   put field "StockNumber" into start
  611.   put field "PeriodSales" into psales
  612.   put field "CostPrice" into icost
  613.   put psales * icost into tcost
  614.   add tcost to costofgoods
  615.   put "0" into field "PeriodSales"
  616.   go to next card of this background
  617.   repeat until start = field "StockNumber"
  618.     put field "PeriodSales" into psales
  619.     put field "CostPrice" into icost
  620.     put psales * icost into tcost
  621.     add tcost to costofgoods
  622.     set the numberFormat to "0"
  623.     put "0" into field "PeriodSales"
  624.     go to next card of this background
  625.   end repeat
  626.   go to background "Blank"
  627.   set the numberFormat to "$0.00"
  628.   answer "Period Cost Of Goods Sold = $"&costofgoods with "Okay"
  629.   go to first card of background "Inventory"
  630. end mouseUp
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637. -- part 35 (button)
  638. -- low flags: 00
  639. -- high flags: 8003
  640. -- rect: left=426 top=301 right=315 bottom=509
  641. -- title width / last selected line: 0
  642. -- icon id / first selected line: 0 / 0
  643. -- text alignment: 1
  644. -- font id: 0
  645. -- text size: 12
  646. -- style flags: 0
  647. -- line height: 16
  648. -- part name: Year End
  649. ----- HyperTalk script -----
  650. on mouseUp
  651.   go to first card of background "Inventory"
  652.   put 0 into costofgoods
  653.   put field "StockNumber" into start
  654.   put field "YearlySales" into ysales
  655.   put field "CostPrice" into icost
  656.   put ysales * icost into tcost
  657.   add tcost to costofgoods
  658.   put "0" into field "YearlySales"
  659.   go to next card of this background
  660.   repeat until start = field "StockNumber"
  661.     put field "YearlySales" into ysales
  662.     put field "CostPrice" into icost
  663.     put ysales * icost into tcost
  664.     add tcost to costofgoods
  665.     set the numberFormat to "0"
  666.     put "0" into field "YearlySales"
  667.     go to next card of this background
  668.   end repeat
  669.   go to background "Blank"
  670.   set the numberFormat to "$0.00"
  671.   answer "Yearly Cost Of Goods Sold = $"&costofgoods with "Okay"
  672.   go to first card of background "Inventory"
  673. end mouseUp
  674.  
  675.  
  676. -- part 36 (button)
  677. -- low flags: 00
  678. -- high flags: 8003
  679. -- rect: left=426 top=244 right=259 bottom=508
  680. -- title width / last selected line: 0
  681. -- icon id / first selected line: 0 / 0
  682. -- text alignment: 1
  683. -- font id: 0
  684. -- text size: 12
  685. -- style flags: 0
  686. -- line height: 16
  687. -- part name: Print Card
  688. ----- HyperTalk script -----
  689. on mouseUp
  690.   doMenu Print Card
  691. end mouseUp
  692.  
  693.  
  694.  
  695. -- part 37 (field)
  696. -- low flags: 00
  697. -- high flags: 0000
  698. -- rect: left=113 top=294 right=310 bottom=175
  699. -- title width / last selected line: 0
  700. -- icon id / first selected line: 0 / 0
  701. -- text alignment: 65535
  702. -- font id: 3
  703. -- text size: 9
  704. -- style flags: 0
  705. -- line height: 12
  706. -- part name: Minimum
  707.  
  708.  
  709. -- part 38 (field)
  710. -- low flags: 00
  711. -- high flags: 0000
  712. -- rect: left=182 top=294 right=309 bottom=242
  713. -- title width / last selected line: 0
  714. -- icon id / first selected line: 0 / 0
  715. -- text alignment: 65535
  716. -- font id: 3
  717. -- text size: 9
  718. -- style flags: 0
  719. -- line height: 12
  720. -- part name: Maximum
  721.  
  722.  
  723. -- part 39 (field)
  724. -- low flags: 00
  725. -- high flags: 0000
  726. -- rect: left=259 top=293 right=308 bottom=319
  727. -- title width / last selected line: 0
  728. -- icon id / first selected line: 0 / 0
  729. -- text alignment: 65535
  730. -- font id: 3
  731. -- text size: 9
  732. -- style flags: 0
  733. -- line height: 12
  734. -- part name: Reorder
  735.